/*
 *  Copyright (C) 2011 Hatsites
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package org.myorg.ctm.etk.gui.swg.display.create.item.panel;

import javax.swing.LayoutStyle;
import org.myorg.shr.gui.swg.display.labelized.LbzTxfVrt;
import org.myorg.shr.gui.swg.display.panel.PnlAbs;

/**
 *
 * @author Hatsites
 *
 * email: Hatsites_AT_gmail.com
 * ... please remove "_AT_" from the above string to get the right email address
 */

public class PnlIdtAnmName extends PnlAbs{
    public PnlIdtAnmName() {
        initComponents();
        this._ltfNom_ = new LbzTxfVrt("Nom",_LENGTH_TXF_);
        this._ltfEspece_ = new LbzTxfVrt("Espèce",_LENGTH_TXF_);
        this._ltfRace_ = new LbzTxfVrt("Race",_LENGTH_TXF_);
        this._ltfProprietaire_ = new LbzCmbProprietaire("Proprietaire",_LENGTH_TXF_);
    }
    public boolean init() {
        if(!this._ltfEspece_.init()){
            return false;
        }
        if(!this._ltfNom_.init()){
            return false;
        }
        if(!this._ltfProprietaire_.init()){
            return false;
        }
        if(!this._ltfRace_.init()){
           return false;
        }
        super.setSize(340, 168);
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(this._ltfNom_)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(this._ltfEspece_)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(this._ltfRace_)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(this._ltfProprietaire_)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                )
            .addGroup(layout.createSequentialGroup()

                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()



                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(this._ltfNom_)
                .addComponent(this._ltfEspece_)
                .addComponent(this._ltfRace_)
                .addComponent(this._ltfProprietaire_)
                )
                )
        );
        return true;
    }

    public void destroy() {
        return;
    }

    private void initComponents() {
    }

    public String getNameNom(){
       return this._ltfNom_.getText();
    }
    public String getEspece(){
       return this._ltfEspece_.getText();
    }
    public String getRace(){
       return this._ltfRace_.getText();
    }
    public String getIdProprietaire(){
       return this._ltfProprietaire_.getText();
    }

    final static private int _LENGTH_TXF_ = 120;
    private LbzTxfVrt _ltfNom_;
    private LbzTxfVrt _ltfEspece_;
    private LbzTxfVrt _ltfRace_;
    private LbzCmbProprietaire _ltfProprietaire_;
}
